package service.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import pojo.Customer;
import service.CustomerManager;

public class CustomerManagerImpl implements CustomerManager{
	private List<Customer> customers=new ArrayList<Customer>();
	public Customer addCustomer(Customer c) {
		synchronized (customers) {
			c.setId(UUID.randomUUID().toString());
			customers.add(c);
		}
		return c;
	}

	public List<Customer> findAllCustomers() {
		return customers;
	}

}
